﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace sqxt
{
    public partial class remind_rework : Form
    {
        public remind_rework(string s1,string s2)
        {
            InitializeComponent();
            id = s1;
            time = s2;

        }
        string id, time;
        DateTime dt;
        private void remind_rework_Load(object sender, EventArgs e)
        {
            dt = DateTime.Parse(time);
            textBox1.Text = dt.ToLongDateString().ToString();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            SqlConnection conn = new SqlConnection(Dbconnect.s1);
            conn.Open();
            SqlCommand da = new SqlCommand("update followup set next_followup_date='" + DateTime.Parse(dateTimePicker1.Text) + "'   where followup_id='" + id + "'", conn);
            da.ExecuteNonQuery();
            conn.Close();
            MessageBox.Show("修改随访日期成功");
            this.Close();
        }
    }
}